package com.springboot.demo.design.pattern.request.user;

import com.springboot.common.entity.request.ParameterBody;
import lombok.Data;
import org.springframework.util.StringUtils;

/**
 * 用户保存参数
 *
 * @author supu
 * @date 2019-03-19 15:00
 **/
@Data
public class UserSaveParam implements ParameterBody {
    private static final long serialVersionUID = -6944569524832208982L;

    private String name;
    private Byte sex;

    @Override
    public boolean validate() {
        return !StringUtils.isEmpty(name);
    }
}
